from netagent.readers.Reader import *
from netagent.extractor.Extractor import *
from engine.FPContainer import *
from engine.FPPattern import * 
from engine.FPCheck import *
from engine.FPEntity import *

filename='netagent/readers/examples/Stefov.ppt'
d = pptReader(filename)
str = d.process()
e = Extractor(str)
metadata = d.extractMetadata()

container=FPContainer()

ent1=FPEntity("Baraeco test",50,5)

for p in e.collocations:
	ent1.add_fppattern(p,3,"string")

for m in metadata:
	print "Creating pattern with metadata %s" % m
	ent1.add_fppattern(m,2,"string")

container.add_fpentity(ent1)
container.add_fpchecks_from_entities()

print "Starting test"

str1=open(filename,"r").read()
container.check_entities(str1)
container.clear()

